<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<script type="text/javascript" src="js/jquery-1.11.3.min.js" ></script>
		<title>图片预加载</title>
		<script>
			var imgarray = [
				"1.jpg",
				"2.jpg",
				"3.jpg",
				"4.jpg",
				"simgd.jpg"
			];
			var imgarraylength = imgarray.length;
			for(var i = 0; i <= imgarraylength-1; i++){//长度一定要-1
				$('<img/>').attr('src','img/'+imgarray[i]).load(function(){
					$('.preLoad').append($(this));
				});
			}
		</script>
		<style>
			.preLoad{
				width: 500px;
			}
		</style>
	</head>
	<body>
		<h1>图片预加载</h1>
		<div class="preLoad"></div>
	</body>
</html>
